﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace WeChat.Manager
{
    public class ForLogin
    {
        /// <summary>
        /// 判断是否登录
        /// </summary>
        /// <returns></returns>
        public static bool IsLogin()
        {
            if (HttpContext.Current.Session["user"] != null)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        /// <summary>
        /// 注销
        /// </summary>
        public static void LoginOut()
        {
            HttpContext.Current.Session.Abandon();
        }
    }
}
